Port to libgsystem errno API, hard depend on 2014.3
authorColin Walters <walters@verbum.org>
Mon, 5 Jan 2015 02:17:11 +0000 (21:17 -0500)
committerColin Walters <walters@verbum.org>
Mon, 5 Jan 2015 02:17:11 +0000 (21:17 -0500)
This is long overdue to make it to libgsystem.  Update our dependency.

13 files changed:
configure.ac
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo.c
src/libostree/ostree-sepolicy.c
src/libostree/ostree-sysroot-deploy.c
src/libotutil/ot-fs-utils.c
src/libotutil/ot-gio-utils.c
src/libotutil/ot-unix-utils.c
src/libotutil/ot-unix-utils.h
src/libotutil/ot-variant-utils.c
src/ostree/ot-admin-builtin-os-init.c
src/ostree/ot-builtin-trivial-httpd.c

index dafe43c83ac9e95933125c23b42160d16df3b11c..319a7447b443478d3bbccb9579018bbc2501707e 100644 (file)
@@ -42,7 +42,7 @@ AC_CHECK_HEADER([attr/xattr.h],,[AC_MSG_ERROR([You must have attr/xattr.h from l
 
 PKG_PROG_PKG_CONFIG
 
-GIO_DEPENDENCY="gio-unix-2.0 >= 2.36.0 libgsystem >= 2014.2"
+GIO_DEPENDENCY="gio-unix-2.0 >= 2.36.0 libgsystem >= 2014.3"
 PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY)
 
 dnl 5.1.0 is an arbitrary version here
index e9c420c3cce3dc3e71377a305d8bf6f5bdd24191..c31bd3d021692a6893ffa0c3b8c6b0e017c22159 100644 (file)
@@ -69,7 +69,7 @@ checkout_object_for_uncompressed_cache (OstreeRepo      *self,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (G_UNLIKELY (res == -1))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -86,7 +86,7 @@ checkout_object_for_uncompressed_cache (OstreeRepo      *self,
     {
       if (errno != EEXIST)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           g_prefix_error (error, "Storing file '%s': ", temp_filename);
           goto out;
         }
@@ -130,7 +130,7 @@ write_regular_file_content (OstreeRepoCheckoutMode mode,
       while (G_UNLIKELY (res == -1 && errno == EINTR));
       if (G_UNLIKELY (res == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
@@ -139,7 +139,7 @@ write_regular_file_content (OstreeRepoCheckoutMode mode,
       while (G_UNLIKELY (res == -1 && errno == EINTR));
       if (G_UNLIKELY (res == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
               
@@ -152,7 +152,7 @@ write_regular_file_content (OstreeRepoCheckoutMode mode,
           
   if (fsync (fd) == -1)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
           
@@ -186,7 +186,7 @@ checkout_file_from_input_at (OstreeRepoCheckoutMode mode,
       while (G_UNLIKELY (res == -1 && errno == EINTR));
       if (res == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
@@ -197,7 +197,7 @@ checkout_file_from_input_at (OstreeRepoCheckoutMode mode,
                                     g_file_info_get_attribute_uint32 (file_info, "unix::gid"),
                                     AT_SYMLINK_NOFOLLOW) == -1))
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
 
@@ -225,7 +225,7 @@ checkout_file_from_input_at (OstreeRepoCheckoutMode mode,
       while (G_UNLIKELY (fd == -1 && errno == EINTR));
       if (fd == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       temp_out = g_unix_output_stream_new (fd, TRUE);
@@ -301,7 +301,7 @@ checkout_file_unioning_from_input_at (OstreeRepoCheckoutMode mode,
   if (G_UNLIKELY (renameat (destination_dfd, temp_filename,
                             destination_dfd, destination_name) == -1))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -357,7 +357,7 @@ checkout_file_hardlink (OstreeRepo                          *self,
   else
     {
       g_prefix_error (error, "Hardlinking %s to %s: ", loose_path, destination_name);
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -578,7 +578,7 @@ checkout_tree_at (OstreeRepo                        *self,
         did_exist = TRUE;
       else
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -663,7 +663,7 @@ checkout_tree_at (OstreeRepo                        *self,
       while (G_UNLIKELY (res == -1 && errno == EINTR));
       if (G_UNLIKELY (res == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -677,7 +677,7 @@ checkout_tree_at (OstreeRepo                        *self,
       while (G_UNLIKELY (res == -1 && errno == EINTR));
       if (G_UNLIKELY (res == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -690,7 +690,7 @@ checkout_tree_at (OstreeRepo                        *self,
     {
     if (fsync (destination_dfd) == -1)
       {
-        ot_util_set_error_from_errno (error, errno);
+        gs_set_error_from_errno (error, errno);
         goto out;
       }
     }
index 6161f2b5e36c305ca0604dbb7be6b5ad4ecd8041..9d68e5e7fff7e90ebcfe2b69d29bde133adc7137 100644 (file)
@@ -51,7 +51,7 @@ _ostree_repo_ensure_loose_objdir_at (int             dfd,
       int errsv = errno;
       if (G_UNLIKELY (errsv != EEXIST))
         {
-          ot_util_set_error_from_errno (error, errsv);
+          gs_set_error_from_errno (error, errsv);
           return FALSE;
         }
     }
@@ -97,7 +97,7 @@ write_file_metadata_to_xattr (int fd,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (G_UNLIKELY (res == -1))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       return FALSE;
     }
 
@@ -131,7 +131,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
                                 self->target_owner_gid,
                                 AT_SYMLINK_NOFOLLOW) == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -150,7 +150,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
                                 g_file_info_get_attribute_uint32 (file_info, "unix::gid"),
                                 AT_SYMLINK_NOFOLLOW) == -1))
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
@@ -182,7 +182,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
           while (G_UNLIKELY (res == -1 && errno == EINTR));
           if (G_UNLIKELY (res == -1))
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
 
@@ -191,7 +191,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
           while (G_UNLIKELY (res == -1 && errno == EINTR));
           if (G_UNLIKELY (res == -1))
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
 
@@ -220,7 +220,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
               while (G_UNLIKELY (res == -1 && errno == EINTR));
               if (G_UNLIKELY (res == -1))
                 {
-                  ot_util_set_error_from_errno (error, errno);
+                  gs_set_error_from_errno (error, errno);
                   goto out;
                 }
             }
@@ -242,7 +242,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
           while (G_UNLIKELY (res == -1 && errno == EINTR));
           if (G_UNLIKELY (res == -1))
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
         }
@@ -254,7 +254,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
         {
           if (fsync (fd) == -1)
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
         }
@@ -272,7 +272,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
     {
       if (errno != EEXIST)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           g_prefix_error (error, "Storing file '%s': ", temp_filename);
           goto out;
         }
@@ -422,7 +422,7 @@ fallocate_stream (GFileDescriptorBased      *stream,
       int r = posix_fallocate (fd, 0, size);
       if (r != 0)
         {
-          ot_util_set_error_from_errno (error, r);
+          gs_set_error_from_errno (error, r);
           goto out;
         }
     }
index d60dc415cd65aaef1e1ada180efead777a9a392e..d43cc7f0879715a070d1f3032a5b70685941be85 100644 (file)
@@ -1287,7 +1287,7 @@ ostree_repo_open (OstreeRepo    *self,
 
   if (fstat (self->objects_dir_fd, &stbuf) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -1554,7 +1554,7 @@ list_loose_objects_at (OstreeRepo             *self,
   d = fdopendir (dfd);
   if (!d)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -1648,7 +1648,7 @@ list_loose_objects (OstreeRepo                     *self,
             continue;
           else
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
         }
@@ -1798,7 +1798,7 @@ query_info_for_bare_content_object (OstreeRepo      *self,
           ret = TRUE;
           goto out;
         }
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -1818,7 +1818,7 @@ query_info_for_bare_content_object (OstreeRepo      *self,
       while (G_UNLIKELY (len == -1 && errno == EINTR));
       if (len == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       targetbuf[len] = '\0';
@@ -2108,7 +2108,7 @@ _ostree_repo_has_loose_object (OstreeRepo           *self,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (res == -1 && errno != ENOENT)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -2331,7 +2331,7 @@ import_one_object_link (OstreeRepo    *self,
           ret = TRUE;
         }
       else
-        ot_util_set_error_from_errno (error, errno);
+        gs_set_error_from_errno (error, errno);
       
       goto out;
     }
index e5027f3f3115e537bd82c90bfff0ac5eddcb0c72..c928ee32076fbb76b55cd3310c5286f40f35bee4 100644 (file)
@@ -347,7 +347,7 @@ ostree_sepolicy_get_label (OstreeSePolicy    *self,
           int errsv = errno;
           if (errsv != ENOENT)
             {
-              ot_util_set_error_from_errno (error, errsv);
+              gs_set_error_from_errno (error, errsv);
               goto out;
             }
         }
@@ -440,7 +440,7 @@ ostree_sepolicy_restorecon (OstreeSePolicy    *self,
           int res = lsetfilecon (gs_file_get_path_cached (target), label);
           if (res != 0)
             {
-              ot_util_set_error_from_errno (error, errno);
+              gs_set_error_from_errno (error, errno);
               goto out;
             }
         }
index 40dd7b54cea24427b64a61c5ed9aea39759db65d..70e4bd3954a4c79843b03d822c45e3d3305f5225 100644 (file)
@@ -79,7 +79,7 @@ copy_one_file_fsync_at (int              src_parent_dfd,
       src_fd = openat (src_parent_dfd, name, O_RDONLY | O_NOFOLLOW | O_NOCTTY | O_NOATIME | O_CLOEXEC);
       if (src_fd == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       in = g_unix_input_stream_new (src_fd, TRUE);
@@ -88,7 +88,7 @@ copy_one_file_fsync_at (int              src_parent_dfd,
                         stbuf->st_mode);
       if (dest_fd == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       out = g_unix_output_stream_new (dest_fd, TRUE);
@@ -98,18 +98,18 @@ copy_one_file_fsync_at (int              src_parent_dfd,
 
       if (fchown (dest_fd, stbuf->st_uid, stbuf->st_gid) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       if (fchmod (dest_fd, stbuf->st_mode) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
       if (fdatasync (dest_fd) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
@@ -125,20 +125,20 @@ copy_one_file_fsync_at (int              src_parent_dfd,
       while (G_UNLIKELY (len == -1 && errno == EINTR));
       if (len == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       targetbuf[len] = '\0';
       if (symlinkat (targetbuf, dest_parent_dfd, name) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
       if (fchownat (dest_parent_dfd, name,
                     stbuf->st_uid, stbuf->st_gid,
                     AT_SYMLINK_NOFOLLOW) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -180,17 +180,17 @@ dirfd_copy_attributes_and_xattrs (int            src_parent_dfd,
 
   if (fstat (src_dfd, &src_stbuf) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
   if (fchown (dest_dfd, src_stbuf.st_uid, src_stbuf.st_gid) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
   if (fchmod (dest_dfd, src_stbuf.st_mode) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -218,7 +218,7 @@ copy_dir_recurse_fsync (int              src_parent_dfd,
   /* Create with mode 0700, we'll fchmod/fchown later */
   if (mkdirat (dest_parent_dfd, name, 0700) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -232,7 +232,7 @@ copy_dir_recurse_fsync (int              src_parent_dfd,
   srcd = fdopendir (src_dfd);
   if (!srcd)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -248,7 +248,7 @@ copy_dir_recurse_fsync (int              src_parent_dfd,
       if (fstatat (src_dfd, name, &child_stbuf,
                    AT_SYMLINK_NOFOLLOW) != 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
 
@@ -270,7 +270,7 @@ copy_dir_recurse_fsync (int              src_parent_dfd,
   /* And finally, fsync the fd */
   if (fsync (dest_dfd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -337,7 +337,7 @@ ensure_directory_from_template (int                 orig_etc_fd,
         }
       else
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           g_prefix_error (error, "mkdirat: ");
           goto out;
         }
@@ -387,7 +387,7 @@ copy_modified_config_file (int                 orig_etc_fd,
 
   if (fstatat (modified_etc_fd, path, &modified_stbuf, AT_SYMLINK_NOFOLLOW) < 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       g_prefix_error (error, "Failed to read modified config file '%s': ", path);
       goto out;
     }
@@ -405,7 +405,7 @@ copy_modified_config_file (int                 orig_etc_fd,
       dest_parent_dfd = dup (new_etc_fd);
       if (dest_parent_dfd == -1)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -418,7 +418,7 @@ copy_modified_config_file (int                 orig_etc_fd,
         ;
       else
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -444,7 +444,7 @@ copy_modified_config_file (int                 orig_etc_fd,
     {
       if (unlinkat (new_etc_fd, path, 0) < 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -472,7 +472,7 @@ copy_modified_config_file (int                 orig_etc_fd,
 
   if (fsync (dest_parent_dfd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
index 966f31ae007347bca0bf8b3c131fc36a15ac8c8a..bd834130e2ac02e850e8862439eb9bfbdba9a674 100644 (file)
@@ -43,7 +43,7 @@ ot_gopendirat (int             dfd,
   int ret = ot_opendirat (dfd, path, follow);
   if (ret == -1)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       return FALSE;
     }
   *out_fd = ret;
@@ -69,7 +69,7 @@ ot_lgetxattrat (int            dfd,
   while (G_UNLIKELY (bytes_read < 0 && errno == EINTR));
   if (G_UNLIKELY (bytes_read < 0))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -79,7 +79,7 @@ ot_lgetxattrat (int            dfd,
   while (G_UNLIKELY (real_size < 0 && errno == EINTR));
   if (G_UNLIKELY (real_size < 0))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       g_free (buf);
       goto out;
     }
@@ -109,7 +109,7 @@ ot_lsetxattrat (int            dfd,
   while (G_UNLIKELY (res == -1 && errno == EINTR));
   if (G_UNLIKELY (res == -1))
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       return FALSE;
     }
 
index dff2113cfe1aca7cab3e48cfaad5cdc9f9828b65..5b7ad1a3badc607018754b32202d33acb2b0dcdb 100644 (file)
@@ -315,7 +315,7 @@ ot_gfile_replace_contents_fsync (GFile          *path,
       int r = posix_fallocate (fd, 0, g_bytes_get_size (contents));
       if (r != 0)
         {
-          ot_util_set_error_from_errno (error, r);
+          gs_set_error_from_errno (error, r);
           goto out;
         }
     }
@@ -326,7 +326,7 @@ ot_gfile_replace_contents_fsync (GFile          *path,
 
   if (fdatasync (fd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -335,7 +335,7 @@ ot_gfile_replace_contents_fsync (GFile          *path,
 
   if (renameat (parent_dfd, tmpname, parent_dfd, target_basename) == -1)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -403,7 +403,7 @@ ot_util_fsync_directory (GFile         *dir,
 
   if (fsync (dfd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -519,7 +519,7 @@ ot_gfile_atomic_symlink_swap (GFile          *path,
   /* Ensure the link has hit disk */
   if (fsync (parent_dfd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -529,7 +529,7 @@ ot_gfile_atomic_symlink_swap (GFile          *path,
   /* And sync again for good measure */
   if (fsync (parent_dfd) != 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
index 2933d649b767df1eb4998c7de7542abfa910444d..daa3f0047e4fca7ee6a2cc384ff9f7222c039a1d 100644 (file)
@@ -123,17 +123,6 @@ ot_util_path_split_validate (const char *path,
   return ret;
 }
 
-void
-ot_util_set_error_from_errno (GError **error,
-                              gint     saved_errno)
-{
-  g_set_error_literal (error,
-                       G_IO_ERROR,
-                       g_io_error_from_errno (saved_errno),
-                       g_strerror (saved_errno));
-  errno = saved_errno;
-}
-
 void
 ot_util_fatal_literal (const char *msg)
 {
index aba997fe34871c4076b078f90e1bfa5f23863eaa..5f7011d87679a1126f4460747820c4c57712e89b 100644 (file)
@@ -44,7 +44,5 @@ gboolean ot_util_filename_validate (const char *name, GError **error);
 
 gboolean ot_util_path_split_validate (const char *path, GPtrArray **out_components, GError **error);
 
-void ot_util_set_error_from_errno (GError **error, gint saved_errno);
-
 G_END_DECLS
 
index aa3dff56bbb7738f3dbf191c1fbf080308d3f266..80098283256a66382dddc5e1ac149d51663177a9 100644 (file)
@@ -188,7 +188,7 @@ ot_util_variant_map_fd (GFileDescriptorBased  *stream,
               g_file_descriptor_based_get_fd (stream), start);
   if (!map)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
index a94837e811f872a09580fad22c617fbd9b16dcc8..38a4de10e087ac85fafec68cf26a235b9dc6cd31 100644 (file)
@@ -71,7 +71,7 @@ ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GErr
     goto out;
   if (chmod (gs_file_get_path_cached (dir), 01777) < 0)
     {
-      ot_util_set_error_from_errno (error, errno);
+      gs_set_error_from_errno (error, errno);
       goto out;
     }
 
@@ -86,7 +86,7 @@ ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GErr
     {
       if (symlink ("../run", gs_file_get_path_cached (dir)) < 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
@@ -96,7 +96,7 @@ ot_admin_builtin_os_init (int argc, char **argv, GCancellable *cancellable, GErr
     {
       if (symlink ("../run/lock", gs_file_get_path_cached (dir)) < 0)
         {
-          ot_util_set_error_from_errno (error, errno);
+          gs_set_error_from_errno (error, errno);
           goto out;
         }
     }
index f4e303c6e90d0c5dd1fb40efff1d0f4e285f07fd..197b44ff8c4f31f9c5c09b73fbbb977e43415dce 100644 (file)
@@ -423,7 +423,7 @@ ostree_builtin_trivial_httpd (int argc, char **argv, GCancellable *cancellable,
           int errsv = errno;
           if (errsv != ENOSYS)
             {
-              ot_util_set_error_from_errno (error, errsv);
+              gs_set_error_from_errno (error, errsv);
               goto out;
             }
         }